﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Gsp315_AIBehaviors
{
    //Steering Behaviour Types...
    public enum behaviour_Type { SEEK=0, FLEE, ARRIVE, WANDER, PURSUIT /*, ETC*/};
    //Deceleration for Arrive speeds...
    public enum arrive_Speeds { SLOW=3, NORMAL=2, FAST=1 };


    public static class SteeringBehaviours//: ISteeringBehaviour
    {
        //
        //public Vector2 Seek(Vector2 target)
        public static Vector2 Seek(Player seeker, Player target)
        {
            Vector2 desired = new Vector2((target.Position.X - seeker.Position.X), (target.Position.Y - seeker.Position.Y));
            desired.Normalize();
            return (desired - seeker.Direction);
        }

        //
        //public Vector2 Flee(Vector2 target)
        public static Vector2 Flee(Player fleer, Player target)
        {
            Vector2 desired = new Vector2((target.Position.X - fleer.Position.X), (target.Position.Y - fleer.Position.Y));
            desired.Normalize();
            return (fleer.Direction - desired);
        }

        //
        public static Vector2 Arrive(Player arriver, arrive_Speeds deceleration, Player target)
        {
            //*****Implement details...
            return new Vector2();
        }

        //
        public static Vector2 Wander(Player self)
        {
            Vector2 v1 = new Vector2(0.01f);
            //Return a random slightly off, (either for X-axis or Y-axis) position
            return v1;
        }
    }//class
}//namespace
